<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core">

    <ui:composition template="/template.xhtml">
        <ui:define name="title">
            <h:outputText value="#{bundle.EditHardwareTitle}"></h:outputText>
        </ui:define>
        <ui:define name="body">
            <h:panelGroup id="messagePanel" layout="block">
                <h:messages errorStyle="color: red" infoStyle="color: green" layout="table"/>
            </h:panelGroup>
            <h:form>
                <h:panelGrid columns="2">
                    <h:outputLabel value="#{bundle.EditHardwareLabel_assembly}" for="assembly" />
                    <h:inputText id="assembly" value="#{hardwareController.selected.assembly}" title="#{bundle.EditHardwareTitle_assembly}" />
                    <h:outputLabel value="#{bundle.EditHardwareLabel_description}" for="description" />
                    <h:inputText id="description" value="#{hardwareController.selected.description}" title="#{bundle.EditHardwareTitle_description}" />
                    <h:outputLabel value="#{bundle.EditHardwareLabel_price}" for="price" />
                    <h:inputText id="price" value="#{hardwareController.selected.price}" title="#{bundle.EditHardwareTitle_price}" />
                    <h:outputLabel value="#{bundle.EditHardwareLabel_supply}" for="supply" />
                    <h:selectOneMenu id="supply" value="#{hardwareController.selected.supply}" title="#{bundle.EditHardwareTitle_supply}" >
                        <f:selectItems value="#{supplyController.itemsAvailableSelectOne}"/>
                    </h:selectOneMenu>
                    <h:outputLabel value="#{bundle.EditHardwareLabel_ID}" for="ID" />
                    <h:inputText id="ID" value="#{hardwareController.selected.ID}" title="#{bundle.EditHardwareTitle_ID}" />
                </h:panelGrid>
                <h:commandLink action="#{hardwareController.update}" value="#{bundle.EditHardwareSaveLink}"/>
                <br />
                <br />
                <h:link outcome="View" value="#{bundle.EditHardwareViewLink}"/>
                <br />
                <h:commandLink action="#{hardwareController.prepareList}" value="#{bundle.EditHardwareShowAllLink}" immediate="true"/>
                <br />
                <br />
                <h:link outcome="/home" value="#{bundle.EditHardwareIndexLink}" />
            </h:form>
        </ui:define>
    </ui:composition>

</html>
